/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author GiangLT
 */
@Entity
@Table(name = "BROADCAST_PROCESS", catalog = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "BroadcastProcess.findAll", query = "SELECT b FROM BroadcastProcess b"),
    @NamedQuery(name = "BroadcastProcess.findById", query = "SELECT b FROM BroadcastProcess b WHERE b.id = :id"),
    @NamedQuery(name = "BroadcastProcess.findByMsisdn", query = "SELECT b FROM BroadcastProcess b WHERE b.msisdn = :msisdn"),
    @NamedQuery(name = "BroadcastProcess.findByContent", query = "SELECT b FROM BroadcastProcess b WHERE b.content = :content"),
    @NamedQuery(name = "BroadcastProcess.findByStatus", query = "SELECT b FROM BroadcastProcess b WHERE b.status = :status"),
    @NamedQuery(name = "BroadcastProcess.findByLastUpdateTime", query = "SELECT b FROM BroadcastProcess b WHERE b.lastUpdateTime = :lastUpdateTime"),
    @NamedQuery(name = "BroadcastProcess.findByStatusCode", query = "SELECT b FROM BroadcastProcess b WHERE b.statusCode = :statusCode"),
    @NamedQuery(name = "BroadcastProcess.findByIpcModule", query = "SELECT b FROM BroadcastProcess b WHERE b.ipcModule = :ipcModule"),
    @NamedQuery(name = "BroadcastProcess.findByDestination", query = "SELECT b FROM BroadcastProcess b WHERE b.destination = :destination"),
    @NamedQuery(name = "BroadcastProcess.findByDescription", query = "SELECT b FROM BroadcastProcess b WHERE b.description = :description")})
public class BroadcastProcess implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID")
    private BigDecimal id;
    @Size(max = 40)
    @Column(name = "MSISDN")
    private String msisdn;
    @Size(max = 1000)
    @Column(name = "CONTENT")
    private String content;
    @Size(max = 40)
    @Column(name = "STATUS")
    private String status;
    @Column(name = "LAST_UPDATE_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lastUpdateTime;
    @Column(name = "STATUS_CODE")
    private BigInteger statusCode;
    @Size(max = 100)
    @Column(name = "IPC_MODULE")
    private String ipcModule;
    @Size(max = 100)
    @Column(name = "DESTINATION")
    private String destination;
    @Size(max = 400)
    @Column(name = "DESCRIPTION")
    private String description;

    public BroadcastProcess() {
    }

    public BroadcastProcess(BigDecimal id) {
        this.id = id;
    }

    public BigDecimal getId() {
        return id;
    }

    public void setId(BigDecimal id) {
        this.id = id;
    }

    public String getMsisdn() {
        return msisdn;
    }

    public void setMsisdn(String msisdn) {
        this.msisdn = msisdn;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public BigInteger getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(BigInteger statusCode) {
        this.statusCode = statusCode;
    }

    public String getIpcModule() {
        return ipcModule;
    }

    public void setIpcModule(String ipcModule) {
        this.ipcModule = ipcModule;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BroadcastProcess)) {
            return false;
        }
        BroadcastProcess other = (BroadcastProcess) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.thienloc.omap.entity.BroadcastProcess[ id=" + id + " ]";
    }
    
}
